<template>
    <view>
	 <view v-if="showCheck">
	 	标题:{{title}} 内容:{{content}} 时间:{{time}}
	 </view>
	 <view v-if="messageCheck" style="font-size: 20px;text-align: center;padding-top: 50%;">
	 	暂时没有新通知
	 </view>
	</view> 
</template>

<script>
	export default {
		data() {
			return {
				title:'',
				content:'',
				time:'',
				showCheck:false,
				messageCheck:false
			}
		},
		methods: {
			
		},
		onLoad() {
			uni.request({
				url: 'http://rap2api.taobao.org/app/mock/286869/message',
				method: 'GET',
				data: {},
				success: res => {
					this.title=res.data.title;
					this.content=res.data.content;
					this.time=res.data.time;
					this.showCheck=true;
				},
				fail: () => {
					this.messageCheck=true;
				},
				complete: () => {}
			});
		}
	}
</script>

<style>

</style>
